{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Artificial Intelligence, Machine Learning and Deep Learning - Are they same?\n",
    "\n",
    "![](http://www.codeheroku.com/static/blog/images/pid18_banner.jpg)\n",
    "\n",
    "The most common confusion that beginners have when they start to learn Machine Learning is- “Are Artificial Intelligence(AI), Machine Learning(ML) and Deep Learning(DL) the same thing?”\n",
    "\n",
    "And that’s a question which I personally hear a lot from so many people. So, I thought why not make a blog post to explain it?\n",
    "\n",
    "## Artificial Intelligence (AI)\n",
    "\n",
    "Artificial intelligence refers to the capability of a machines to imitate intelligent human behaviour. In other words, any device that is able to perform tasks that normally require human intelligence such as making decisions or giving (meaningful) responses in a conversation can be said to have some kind of artificial intelligence.\n",
    "\n",
    "Particularly, this is a broad area of computer science, which deals with the simulation of intelligent behavior in computers.\n",
    "\n",
    "Virtual assistants are very good examples of implementation of AI in real life. With the power of AI, virtual assistants such as Google Assistant or Siri (by Apple) can nowadays imitate human behaviours with an exceptional perfection.\n",
    "\n",
    "\n",
    "AI can be implemented through huge collection of explicitly programmed if-else statements, or a complex statistical model with advanced parameters. But, the end goal of AI remains same- “Simulation of human intelligence in machines”.\n",
    "\n",
    "The practice of explicitly programming if-else statements for implementing AI models is known as “Good Old-Fashioned Artificial Intelligence” (GOFAI), which was the dominant paradigm of AI research from the mid-1950s until the late 1980s.\n",
    "\n",
    "Some AI models might be termed as “weak AI” models since they only focus on getting the work done without figuring out how human reasoning works. One such example could be- bots created using Artificial Intelligence Markup Language (AIML). These bots try to give responses by simply matching some basic patterns against the input using an XML-like structure of conditions without trying to “understand” the conversation.\n",
    "\n",
    "On the other hand, AI systems which pretend to think exactly like humans do, are termed as “strong AI” models. We have already seen an example of this while discussing about Google Assistant.\n",
    "\n",
    "## Machine Learning (ML)\n",
    "\n",
    "While AI is a broad area of cognitive computing, Machine Learning is a particular subset of AI which mainly deals with the study of how machines learn.\n",
    "\n",
    "Doesn’t make sense? Let me clear that for you.\n",
    "\n",
    "Early AI researchers found some problems way much harder to solve with the early available techniques of AI (GOFAI). Hard coded algorithms were simply not useful for solving those problems.\n",
    "\n",
    "For example, how would you make a computer to distinguish between pictures of cats and dogs? Will you write hard-coded algorithms for identifying each picture individually? What happens if it sees a picture that it has never seen before? What happens if it sees a partial picture? Will it still be able to recognize it?\n",
    "\n",
    "![](http://www.codeheroku.com/static/blog/images/pid18_3.png)\n",
    "\n",
    "It turns out that for solving these kind problems, instead of just imitating human behaviour, researchers started to find ways to imitate how humans learn. And that’s what gave rise to the field of Machine Learning. It is the field of study that gives computers the ability to learn without being explicitly programmed.\n",
    "\n",
    "More specifically, in case of machine learning problems, you need to give the computer some data (lots of cat and dog images in this case), tell it to “learn” from that data, and then predict the correct output for new, unseen data.\n",
    "\n",
    "Practically, this is nothing but a mathematical function (model) which maps inputs to its correct outputs. The task of Machine Learning engineers is to figure out and implement this “mathematical function” in such a way that programmers won’t need to write “hard-coded” algorithms for solving each individual problem.\n",
    "\n",
    "## Deep Learning (DL)\n",
    "\n",
    "Before we discuss anything about this, I want you to have a look at the following image:\n",
    "\n",
    "![](http://www.codeheroku.com/static/blog/images/pid18_1.png)\n",
    "\n",
    "Now look at this image:\n",
    "\n",
    "![](http://www.codeheroku.com/static/blog/images/pid18_2.png)\n",
    "\n",
    "What did you see? 4?\n",
    "\n",
    "Easy, right? It took you just fraction of a second to figure out that both of these images represent the number four.\n",
    "\n",
    "Even though these images don’t look exactly alike (in terms of pixel values), you still were able to recognize these images and label them as the number four. Even poor resolution was not a hurdle for you. How amazing! Let’s take a moment to appreciate our brain for doing this.\n",
    "\n",
    "But, can you explain the process, exactly how you were able to identify these images?\n",
    "\n",
    "This is one thing that you did intuitively. Using your natural instincts, you “felt” that these images are of the number four, without following any particular process for identifying them. And it goes without saying that you did a great job at doing it.\n",
    "\n",
    "So, can we implement a similar mechanism in computers to make them perform tasks that we do intuitively?\n",
    "\n",
    "Yeah, you guessed it right! This paradigm of machine learning is called Deep Learning (DL).\n",
    "\n",
    "Deep Learning is a subfield of machine learning which is concerned with algorithms inspired by the structure and function of the brain.\n",
    "\n",
    "It consists of a particular type of mathematical model that can be thought of as a collection of simple blocks, distributed across multiple layers. Each of these blocks are specialized to perform a particular task and can be adjusted to better predict the final outcome.\n",
    "\n",
    "![](http://www.codeheroku.com/static/blog/images/pid18_4.png)\n",
    "\n",
    "Human brain consists of billions of neurons interconnected to each other. Each neuron receives a signal, processes the signal, and passes it on to the other neurons. This is how the information is processed in our brain.\n",
    "\n",
    "These blocks try to simulate the behaviour of neuron cells present in human brain for performing a particular task. Hence, the collection of these blocks can be referred to as Artificial Neural Network (ANN).\n",
    "\n",
    "Deep Learning is called “deep” because the composition of these blocks are stacked on top of each other forming multiple layers. The deeper you go, the more complex features are extracted.\n",
    "\n",
    "## Conclusion\n",
    "\n",
    "Although terms like artificial intelligence, machine learning and deep learning are used interchangeably but, they are not the same thing. Machine learning is the subset of artificial intelligence and deep learning is a subset of machine learning.\n",
    "\n",
    "![](http://www.codeheroku.com/static/blog/images/pid18_5.png)\n",
    "\n",
    "Here, the key takeaway is:\n",
    "\n",
    "- Artificial Intelligence deals with imitating human intelligence.\n",
    "- Machine Learning deals with imitating how humans learn.\n",
    "- Deep learning deals with imitating how human brain processes data with the help of neurons.\n",
    "\n",
    "\n",
    "Follow our [Medium Publication](https://medium.com/code-heroku) to get regular updates on these kind of posts.\n",
    "\n",
    ">If this article was helpful to you, check out our [Introduction to Machine Learning](http://www.codeheroku.com/course?course_id=1) Course at [Code Heroku](http://www.codeheroku.com/) for a complete guide to Machine Learning.\n",
    "\n",
    "<br><br>\n",
    "<p align=\"center\"><a href=\"http://www.codeheroku.com/\">\n",
    " <img src=\"http://www.codeheroku.com/static/images/logo5.png\"></a>\n",
    "</p>\n",
    "\n",
    "<br>"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.7"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
